<link type="text/css" href="../core/resource/css/weui-mass.css?v=23" rel="stylesheet">
<div class="col-jy" style="width:100%;">
	<div class="form-horizontal">
		<div class="page-header"><h4 class="ng-binding">设置欢迎语</h4></div>
	</div>
	<div class="panel-body page_simple">
		<div class="weui-desktop-layout__main__bd weui-desktop-panel main_bd">
		<div class="grid_line send_filter" style="margin-top:0">
			 <div class="grid_item target">
				<label class="bold" style="color:#333;line-height: 30px;vertical-align: middle; margin-right: .8em;">欢迎语标题</label>
				<div class="filter_content">
				   <div style="width:166px">
						<input type="text" class="form-control must_set"  ng-model="pagedata.item.title" ng-readonly="false" style="border-color: rgb(221, 221, 221);">
					</div>
				</div>
			</div>
			 <div class="grid_item target">
				<label class="bold" style="color:#333;line-height: 30px;vertical-align: middle; margin-right: .8em;">请选择部门</label>
				<div class="filter_content">
				  <div style="width:266px">
					<select class="form-control" ng-model="pagedata.item.bumenid">
						<option value="0" selected>请选择部门</option>
						<option ng-repeat="op in pagedata.groups" ng-selected="pagedata.item.bumenid==op.bumenid" value="{{op.bumenid}}" >{{op.title}}</option>
					</select>
				  </div>
				</div>
			  </div>
		</div>
		  <div id="js_msgSender" class="msg_sender">
			<div class="msg_tab">
			  <div class="tab_navs_panel">
				<span class="tab_navs_switch_wrp switch_prev js_switch_prev">
				  <span class="tab_navs_switch"></span>
				</span>
				<span class="tab_navs_switch_wrp switch_next js_switch_next">
				  <span class="tab_navs_switch"></span>
				</span>
				<div class="tab_navs_wrp">
				  <ul class="tab_navs js_tab_navs" style="margin-left:0;margin-bottom:0">
					<li class="tab_nav tab_text width6 selected">
					  <a href="javascript:void(0);">&nbsp;
						<i class="icon_msg_sender"></i>
						<span class="msg_tab_title">欢迎语内容</span>
					  </a>
					</li>
				  </ul>
				</div>
			  </div>
			  <div class="tab_panel" style="min-height:180px">
				<div class="tab_content">
				  <div class="js_textArea inner no_extra">
					<div class="emotion_editor">
					  <textarea style="height:200px;border: 0 solid #ddd;width:100%" class="form-control" ng-model="pagedata.item.content" cols="70"></textarea>
					  <p class="editor_tip js_editorTip" style="float: right;color: #9a9a9a;">一共可输入<em>300</em>字</p>
					  <div class="editor_toolbar" style="padding: 0 20px;line-height: 36px;background-color: #fff; border-top: 1px solid #e7e7eb;">
							<div class="help-block">
								<!--<a href="javascript:;" ng-click="pagedata.selectEmoji();">
									<svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 18 18"><path fill="#4A4A51" d="M9 0a9 9 0 1 1 0 18A9 9 0 0 1 9 0zm.426 1C4.526 1 .9 4.582.9 9.421.9 13.418 4.526 17 9.426 17c4.048 0 7.674-3.582 7.674-7.579C17.1 4.581 13.474 1 9.426 1zM15 10c-.337 2.978-2.415 5-5.538 5C5.415 15 3.337 12.978 3 10h12zm-2.5-5a1.5 1.5 0 1 1 0 3 1.5 1.5 0 0 1 0-3zm-7 0a1.5 1.5 0 1 1 0 3 1.5 1.5 0 0 1 0-3z"></path></svg>
								</a>-->
								<a href="javascript:;" ng-click="modal_func(pagedata.item,'content','tools.add_text','add_url','core')">
									<svg xmlns="http://www.w3.org/2000/svg" width="16" height="20" viewBox="0 0 16 20">
									<g fill="#4A4A51" transform="rotate(30 4.75 17.727)">
									  <path d="M3.5.948a3.5 3.5 0 0 1 3.5 3.5l-.001 1.5H5.524V4.474A2.05 2.05 0 0 0 1.43 4.32l-.005.153v4.01a2.05 2.05 0 0 0 1.576 1.995v1.486A3.5 3.5 0 0 1 0 8.5V4.448a3.5 3.5 0 0 1 3.5-3.5z"></path>
									  <path d="M3.5 18.01a3.5 3.5 0 0 1-3.5-3.5v-1.5h1.476v1.45a2.05 2.05 0 0 0 4.095.152l.005-.153v-3.978A2.05 2.05 0 0 0 4 8.486V7a3.5 3.5 0 0 1 3 3.465v4.046a3.5 3.5 0 0 1-3.5 3.5z"></path>
									</g>
									</svg>
								</a>
								<!--<a href="javascript:;" ng-click="modal_func(pagedata.item,'content','tools.add_text','add_url','core','isapp=1')">
									<svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 18 18"><path fill="#4A4A51" d="M9 .667a8.333 8.333 0 1 1 0 16.666A8.333 8.333 0 0 1 9 .667zm0 1a7.333 7.333 0 1 0 0 14.666A7.333 7.333 0 0 0 9 1.667zm2.48 2.388c1.706 0 3.092 1.248 3.092 2.799 0 1.366-1.048 2.513-2.508 2.767l-.144.002c-.437 0-.691-.32-.527-.69a.947.947 0 0 1 .666-.53c.801-.194 1.346-.82 1.346-1.55 0-.882-.843-1.602-1.896-1.602s-1.896.72-1.896 1.603v4.401c0 1.55-1.386 2.8-3.093 2.8-1.706 0-3.092-1.25-3.092-2.8 0-1.359 1.073-2.52 2.535-2.74h.117c.33 0 .57.198.57.48 0 .05-.002.072-.007.1a.379.379 0 0 1-.036.11c-.105.246-.375.459-.666.531-.796.193-1.346.815-1.346 1.52 0 .882.843 1.602 1.896 1.602s1.896-.72 1.896-1.603V6.854c0-1.55 1.386-2.8 3.093-2.8z"></path></svg>
								</a>-->
								<div style="line-height:1.4">“<red>[客户名称]</red>”表示当前客户的名称变量，会自动替换！</div>
							</div>
					  </div>
					  <div class="msgSender_media_classFixImg">
						  <div class="js_previe_media_box">
								<div class="preview_media_context preview_media_context_9 no-hover">
								  <div ng-if="pagedata.item.miniprogram.title" class="preview_img_context jsImgView">
										<i class="preview_sized_img" style="background-image: url({{tomedia(pagedata.item.miniprogram.image) || '../core/resource/images/nopic.jpg'}})"></i>
										<button class="preview_media_remove_btn jsImgDel" style="right:50px;" onclick="$('#show_addwxapp').modal();">
										  <svg width="16" height="18" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">
										  <g fill="none" fill-rule="evenodd">
										  <path fill="transparent" d="M0 0h24v24H0z"></path>
										  <path d="M13 4v1.5H4.5v14h14V11H20v8.5a1.5 1.5 0 01-1.5 1.5h-14A1.5 1.5 0 013 19.5v-14A1.5 1.5 0 014.5 4H13zm5.034.875l1.414 1.414-8.327 8.327-2.16 1.156c-.453.242-.645.098-.453-.322l.043-.087 1.156-2.16 8.327-8.328zm2.436-1.319l.297.297c.309.308.22.898-.175 1.292l-.587.587-1.414-1.414.587-.587c.405-.405.98-.487 1.292-.175z" fill="#4C4D4E"></path>
										  </g>
										  </svg>
										<div class="preview_img_change_popover weui-desktop-tooltip">编辑</div>
									  </button>
									  <button class="preview_media_remove_btn jsImgDel" ng-click="pagedata.item.miniprogram={}">
										  <svg width="14px" height="16px" viewBox="0 0 14 16" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
											<g stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
											  <g transform="translate(-9.000000, -8.000000)" fill="#9B9B9B">
												<path d="M9.875,12.4444441 C9.38864562,12.4440384 9,12.0555515 9,11.5763872 L9,11.5347239 C9,11.0612132 9.39209232,10.6666667 9.8757627,10.6666667 L22.1242373,10.6666667 C22.610948,10.6666667 23,11.0553091 23,11.5347239 L23,11.5763872 C23,12.049649 22.6083198,12.4440296 22.125,12.4444441 L22.125,23.125 C22.125,23.6082492 21.7332492,24 21.25,24 L10.75,24 C10.2667508,24 9.875,23.6082492 9.875,23.125 L9.875,12.4444441 Z M20.375,12.4444444 L11.625,12.4444444 L11.625,22.2222222 L20.375,22.2222222 L20.375,12.4444444 Z M14.2419307,8 L17.7580693,8 C18.2303967,8 18.625,8.38864247 18.625,8.86805725 L18.625,9.77777778 L13.375,9.77777778 L13.375,8.86805725 C13.375,8.39454651 13.7631381,8 14.2419307,8 Z M17.75,14.2222222 C18.2366183,14.2222222 18.625,14.6126128 18.625,15.094184 L18.625,20.4613715 C18.625,20.9510091 18.2332492,21.3333333 17.75,21.3333333 C17.2633817,21.3333333 16.875,20.9429427 16.875,20.4613715 L16.875,15.094184 C16.875,14.6045464 17.2667508,14.2222222 17.75,14.2222222 Z M14.25,14.2222222 C14.7366183,14.2222222 15.125,14.6126128 15.125,15.094184 L15.125,20.4613715 C15.125,20.9510091 14.7332492,21.3333333 14.25,21.3333333 C13.7633817,21.3333333 13.375,20.9429427 13.375,20.4613715 L13.375,15.094184 C13.375,14.6045464 13.7667508,14.2222222 14.25,14.2222222 Z"></path>
											  </g>
											</g>
										  </svg>
										<div class="preview_img_change_popover weui-desktop-tooltip">删除</div>
									  </button>
									  <div class="t-c" style="position: absolute;color:#fff;padding:5px;width:100%;bottom: 0;background-color: rgba(0, 0, 0, 0.3);">{{pagedata.item.miniprogram.title}}</div>
								  </div>
								  <div ng-if="!pagedata.item.miniprogram.title" class="add_img" onclick="$('#show_addwxapp').modal();">
									<svg ng-if="!pagedata.item.miniprogram.title" width="40px" height="40px" viewBox="0 0 40 40" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
									  <g stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
										<g transform="translate(-826.000000, -731.000000)" fill="#D8D8D8">
										  <g transform="translate(746.000000, 668.000000)">
											<g transform="translate(72.000000, 63.000000)">
											  <path d="M26,18 L26,0 L30,0 L30,18 L48,18 L48,22 L30,22 L30,40 L26,40 L26,22 L8,22 L8,18 L26,18 Z"></path>
											</g>
										  </g>
										</g>
									  </g>
									</svg>
									<span>{{pagedata.item.miniprogram.title?'编辑小程序':'添加小程序'}}</span>
								</div>
								<!-- -->
								 <div ng-if="pagedata.item.image.pic_url" class="preview_img_context jsImgView">
										<i class="preview_sized_img" style="background-image: url({{tomedia(pagedata.item.image.pic_url) || '../core/resource/images/nopic.jpg'}})"></i>
										<button class="preview_media_remove_btn jsImgDel" style="right:50px;" ng-click="image(pagedata.item.image,'pic_url')">
										  <svg width="16" height="18" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">
										  <g fill="none" fill-rule="evenodd">
										  <path fill="transparent" d="M0 0h24v24H0z"></path>
										  <path d="M13 4v1.5H4.5v14h14V11H20v8.5a1.5 1.5 0 01-1.5 1.5h-14A1.5 1.5 0 013 19.5v-14A1.5 1.5 0 014.5 4H13zm5.034.875l1.414 1.414-8.327 8.327-2.16 1.156c-.453.242-.645.098-.453-.322l.043-.087 1.156-2.16 8.327-8.328zm2.436-1.319l.297.297c.309.308.22.898-.175 1.292l-.587.587-1.414-1.414.587-.587c.405-.405.98-.487 1.292-.175z" fill="#4C4D4E"></path>
										  </g>
										  </svg>
										<div class="preview_img_change_popover weui-desktop-tooltip">替换</div>
									  </button>
									  <button class="preview_media_remove_btn jsImgDel" ng-click="pagedata.item.image={}">
										  <svg width="14px" height="16px" viewBox="0 0 14 16" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
											<g stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
											  <g transform="translate(-9.000000, -8.000000)" fill="#9B9B9B">
												<path d="M9.875,12.4444441 C9.38864562,12.4440384 9,12.0555515 9,11.5763872 L9,11.5347239 C9,11.0612132 9.39209232,10.6666667 9.8757627,10.6666667 L22.1242373,10.6666667 C22.610948,10.6666667 23,11.0553091 23,11.5347239 L23,11.5763872 C23,12.049649 22.6083198,12.4440296 22.125,12.4444441 L22.125,23.125 C22.125,23.6082492 21.7332492,24 21.25,24 L10.75,24 C10.2667508,24 9.875,23.6082492 9.875,23.125 L9.875,12.4444441 Z M20.375,12.4444444 L11.625,12.4444444 L11.625,22.2222222 L20.375,22.2222222 L20.375,12.4444444 Z M14.2419307,8 L17.7580693,8 C18.2303967,8 18.625,8.38864247 18.625,8.86805725 L18.625,9.77777778 L13.375,9.77777778 L13.375,8.86805725 C13.375,8.39454651 13.7631381,8 14.2419307,8 Z M17.75,14.2222222 C18.2366183,14.2222222 18.625,14.6126128 18.625,15.094184 L18.625,20.4613715 C18.625,20.9510091 18.2332492,21.3333333 17.75,21.3333333 C17.2633817,21.3333333 16.875,20.9429427 16.875,20.4613715 L16.875,15.094184 C16.875,14.6045464 17.2667508,14.2222222 17.75,14.2222222 Z M14.25,14.2222222 C14.7366183,14.2222222 15.125,14.6126128 15.125,15.094184 L15.125,20.4613715 C15.125,20.9510091 14.7332492,21.3333333 14.25,21.3333333 C13.7633817,21.3333333 13.375,20.9429427 13.375,20.4613715 L13.375,15.094184 C13.375,14.6045464 13.7667508,14.2222222 14.25,14.2222222 Z"></path>
											  </g>
											</g>
										  </svg>
										<div class="preview_img_change_popover weui-desktop-tooltip">删除</div>
									  </button>
								  </div>
								  <div ng-if="!pagedata.item.image.pic_url" class="add_img" ng-click="image(pagedata.item.image,'pic_url')">
									<svg width="40px" height="40px" viewBox="0 0 40 40" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
									  <g stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
										<g transform="translate(-826.000000, -731.000000)" fill="#D8D8D8">
										  <g transform="translate(746.000000, 668.000000)">
											<g transform="translate(72.000000, 63.000000)">
											  <path d="M26,18 L26,0 L30,0 L30,18 L48,18 L48,22 L30,22 L30,40 L26,40 L26,22 L8,22 L8,18 L26,18 Z"></path>
											</g>
										  </g>
										</g>
									  </g>
									</svg>
									<span>上传图片</span>
								</div>
								<!-- -->
								<div ng-if="pagedata.item.video.url" class="preview_img_context jsImgView">
										<div class="js_preview_hd preview_video_hd" style="padding-bottom:0">
											<video ng-src="{{tomedia(pagedata.item.video.url)}}" style="width:100%;height:186px" controls="controls"></video>
											<i class="js_preview_video_play preview_video_length">00:45</i>
										  </div>
										<button class="preview_media_remove_btn jsImgDel" style="right:50px;" ng-click="choose_source(pagedata.item.video,'url','video');">
										  <svg width="16" height="18" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">
										  <g fill="none" fill-rule="evenodd">
										  <path fill="transparent" d="M0 0h24v24H0z"></path>
										  <path d="M13 4v1.5H4.5v14h14V11H20v8.5a1.5 1.5 0 01-1.5 1.5h-14A1.5 1.5 0 013 19.5v-14A1.5 1.5 0 014.5 4H13zm5.034.875l1.414 1.414-8.327 8.327-2.16 1.156c-.453.242-.645.098-.453-.322l.043-.087 1.156-2.16 8.327-8.328zm2.436-1.319l.297.297c.309.308.22.898-.175 1.292l-.587.587-1.414-1.414.587-.587c.405-.405.98-.487 1.292-.175z" fill="#4C4D4E"></path>
										  </g>
										  </svg>
										<div class="preview_img_change_popover weui-desktop-tooltip">替换</div>
									  </button>
									  <button class="preview_media_remove_btn jsImgDel" ng-click="pagedata.item.video={}">
										  <svg width="14px" height="16px" viewBox="0 0 14 16" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
											<g stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
											  <g transform="translate(-9.000000, -8.000000)" fill="#9B9B9B">
												<path d="M9.875,12.4444441 C9.38864562,12.4440384 9,12.0555515 9,11.5763872 L9,11.5347239 C9,11.0612132 9.39209232,10.6666667 9.8757627,10.6666667 L22.1242373,10.6666667 C22.610948,10.6666667 23,11.0553091 23,11.5347239 L23,11.5763872 C23,12.049649 22.6083198,12.4440296 22.125,12.4444441 L22.125,23.125 C22.125,23.6082492 21.7332492,24 21.25,24 L10.75,24 C10.2667508,24 9.875,23.6082492 9.875,23.125 L9.875,12.4444441 Z M20.375,12.4444444 L11.625,12.4444444 L11.625,22.2222222 L20.375,22.2222222 L20.375,12.4444444 Z M14.2419307,8 L17.7580693,8 C18.2303967,8 18.625,8.38864247 18.625,8.86805725 L18.625,9.77777778 L13.375,9.77777778 L13.375,8.86805725 C13.375,8.39454651 13.7631381,8 14.2419307,8 Z M17.75,14.2222222 C18.2366183,14.2222222 18.625,14.6126128 18.625,15.094184 L18.625,20.4613715 C18.625,20.9510091 18.2332492,21.3333333 17.75,21.3333333 C17.2633817,21.3333333 16.875,20.9429427 16.875,20.4613715 L16.875,15.094184 C16.875,14.6045464 17.2667508,14.2222222 17.75,14.2222222 Z M14.25,14.2222222 C14.7366183,14.2222222 15.125,14.6126128 15.125,15.094184 L15.125,20.4613715 C15.125,20.9510091 14.7332492,21.3333333 14.25,21.3333333 C13.7633817,21.3333333 13.375,20.9429427 13.375,20.4613715 L13.375,15.094184 C13.375,14.6045464 13.7667508,14.2222222 14.25,14.2222222 Z"></path>
											  </g>
											</g>
										  </svg>
										<div class="preview_img_change_popover weui-desktop-tooltip">删除</div>
									  </button>
								  </div>
								  <div ng-if="!pagedata.item.video.url" class="add_img" ng-click="choose_source(pagedata.item.video,'url','video');">
									<svg ng-if="!pagedata.item.video.url" width="40px" height="40px" viewBox="0 0 40 40" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
									  <g stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
										<g transform="translate(-826.000000, -731.000000)" fill="#D8D8D8">
										  <g transform="translate(746.000000, 668.000000)">
											<g transform="translate(72.000000, 63.000000)">
											  <path d="M26,18 L26,0 L30,0 L30,18 L48,18 L48,22 L30,22 L30,40 L26,40 L26,22 L8,22 L8,18 L26,18 Z"></path>
											</g>
										  </g>
										</g>
									  </g>
									</svg>
									<span>上传视频</span>
								</div>
								<!-- -->
								 <div ng-if="pagedata.item.link.title" class="preview_img_context jsImgView">
										<i class="preview_sized_img" style="background-image: url({{tomedia(pagedata.item.link.picurl) || '../core/resource/images/nopic.jpg'}})"></i>
										<button class="preview_media_remove_btn jsImgDel" style="right:50px;" onclick="$('#show_link').modal();">
										  <svg width="16" height="18" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">
										  <g fill="none" fill-rule="evenodd">
										  <path fill="transparent" d="M0 0h24v24H0z"></path>
										  <path d="M13 4v1.5H4.5v14h14V11H20v8.5a1.5 1.5 0 01-1.5 1.5h-14A1.5 1.5 0 013 19.5v-14A1.5 1.5 0 014.5 4H13zm5.034.875l1.414 1.414-8.327 8.327-2.16 1.156c-.453.242-.645.098-.453-.322l.043-.087 1.156-2.16 8.327-8.328zm2.436-1.319l.297.297c.309.308.22.898-.175 1.292l-.587.587-1.414-1.414.587-.587c.405-.405.98-.487 1.292-.175z" fill="#4C4D4E"></path>
										  </g>
										  </svg>
										<div class="preview_img_change_popover weui-desktop-tooltip">替换</div>
									  </button>
									  <button class="preview_media_remove_btn jsImgDel" ng-click="pagedata.item.link={}">
										  <svg width="14px" height="16px" viewBox="0 0 14 16" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
											<g stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
											  <g transform="translate(-9.000000, -8.000000)" fill="#9B9B9B">
												<path d="M9.875,12.4444441 C9.38864562,12.4440384 9,12.0555515 9,11.5763872 L9,11.5347239 C9,11.0612132 9.39209232,10.6666667 9.8757627,10.6666667 L22.1242373,10.6666667 C22.610948,10.6666667 23,11.0553091 23,11.5347239 L23,11.5763872 C23,12.049649 22.6083198,12.4440296 22.125,12.4444441 L22.125,23.125 C22.125,23.6082492 21.7332492,24 21.25,24 L10.75,24 C10.2667508,24 9.875,23.6082492 9.875,23.125 L9.875,12.4444441 Z M20.375,12.4444444 L11.625,12.4444444 L11.625,22.2222222 L20.375,22.2222222 L20.375,12.4444444 Z M14.2419307,8 L17.7580693,8 C18.2303967,8 18.625,8.38864247 18.625,8.86805725 L18.625,9.77777778 L13.375,9.77777778 L13.375,8.86805725 C13.375,8.39454651 13.7631381,8 14.2419307,8 Z M17.75,14.2222222 C18.2366183,14.2222222 18.625,14.6126128 18.625,15.094184 L18.625,20.4613715 C18.625,20.9510091 18.2332492,21.3333333 17.75,21.3333333 C17.2633817,21.3333333 16.875,20.9429427 16.875,20.4613715 L16.875,15.094184 C16.875,14.6045464 17.2667508,14.2222222 17.75,14.2222222 Z M14.25,14.2222222 C14.7366183,14.2222222 15.125,14.6126128 15.125,15.094184 L15.125,20.4613715 C15.125,20.9510091 14.7332492,21.3333333 14.25,21.3333333 C13.7633817,21.3333333 13.375,20.9429427 13.375,20.4613715 L13.375,15.094184 C13.375,14.6045464 13.7667508,14.2222222 14.25,14.2222222 Z"></path>
											  </g>
											</g>
										  </svg>
										<div class="preview_img_change_popover weui-desktop-tooltip">删除</div>
									  </button>
									  <div class="t-c" style="position: absolute;color:#fff;padding:5px;width:100%;bottom: 0;background-color: rgba(0, 0, 0, 0.3);">{{pagedata.item.link.title}}</div>
								  </div>
								  <div ng-if="!pagedata.item.link.title" class="add_img" onclick="$('#show_link').modal();">
									<svg width="40px" height="40px" viewBox="0 0 40 40" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
									  <g stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
										<g transform="translate(-826.000000, -731.000000)" fill="#D8D8D8">
										  <g transform="translate(746.000000, 668.000000)">
											<g transform="translate(72.000000, 63.000000)">
											  <path d="M26,18 L26,0 L30,0 L30,18 L48,18 L48,22 L30,22 L30,40 L26,40 L26,22 L8,22 L8,18 L26,18 Z"></path>
											</g>
										  </g>
										</g>
									  </g>
									</svg>
									<span>自建图文</span>
								</div>
							</div>
						  </div>
						</div>
					  
					</div>
				  </div>
				</div>
				<div class="tab_content" style="display: none;">
				  <div class="js_cardmsgArea inner ">
				  </div>
				</div>
			  </div>
			</div>
		  </div>
		  <div class="tool_bar" style="padding-top:20px">
			<div id="verifycode"></div>
			<div class="send_opr_context">
			  <!--<a class="btn_input jylabel jylabel-info-0" href="javascript:;" onclick="$('#show_yulang').modal();" style="padding: 9px 36px;margin-top:0;margin-right:10px">预览</a>-->
			  <div  class="send_btn_wrp">
			  </div>
			  <button ng-if="pagedata.shownews" class="btn btn-info" style="margin-left:30px;" ng-click="pagedata.shownews=false"><<返回</button>
			  <button class="btn btn-info" style="margin-left:30px;padding:6.5px 26px;border-radius:3px" ng-click="check_form();pagedata.setpost(pagedata.item);">仅保存</button>
			</div>
		  </div>
		</div>
	</div>
</div>
<div id="show_yulang" class="modal fade" tabindex="-1" style="z-index:99999;display:none">
	<div class="modal-dialog" style="width:100%;left:0%;bottom:0;">
		<div class='modal-content' style="padding-bottom:0.6rem;border-radius:0">
		</div>
	</div>
</div>
<div id="show_link" class="modal fade" tabindex="-1" style="z-index:99999;display:none">
	<div class="modal-dialog" style="width:920px;left:0%;bottom:0;">
		<div class='modal-content' style="padding-bottom:0.6rem;border-radius:0">
			<div class="modal-header ng-scope">图文链接 <button aria-hidden="true" data-dismiss="modal" class="close" type="button">×</button></div>
			<div class="modal-body form-horizontal tab-content">
			<div style="margin-top:15px">
				<div class="form-group ng-scope">
					<label class="col-xs-12 col-sm-3 col-md-2 right-label">链接标题</label>
					<div class="col-xs-12 col-sm-8 col-lg-9">
						<input type="text" class="form-control" ng-model="pagedata.item.link.title" style="border-color: rgb(221, 221, 221);">
						<div class="help-block"></div>
					</div>
				</div>
				<div class="form-group ng-scope">
					<label class="col-xs-12 col-sm-3 col-md-2 right-label">链接描述</label>
					<div class="col-xs-12 col-sm-8 col-lg-9">
						<input type="text" class="form-control" ng-model="pagedata.item.link.desc" style="border-color: rgb(221, 221, 221);">
						<div class="help-block"></div>
					</div>
				</div>
				<div class="form-group">
					<label class="col-xs-12 col-sm-3 col-md-2 right-label">链接封面</label>
					<div class="col-xs-12 col-sm-8 col-lg-9">
						<div class="input-group">
							<input type="text" ng-model="pagedata.item.link.picurl" class="form-control">
							<span class="input-group-btn">
								<button class="btn btn-gray" type="button" ng-click="image(pagedata.item.link,'picurl')">选择图片</button>
							</span>
							<span class="input-group-btn">
								<button class="btn btn-black" type="button" ng-click="pagedata.item.link.picurl=''">清空</button>
							</span>
						</div>
						<div class="input-group" style="margin-top:.5em;">
							<img ng-src="{{tomedia(pagedata.item.link.picurl) || '../core/resource/images/nopic.jpg'}}" class="img-responsive img-thumbnail" width="150">
						</div>
					</div>
				</div>
				<div class="form-group ng-scope">
					<label class="col-xs-12 col-sm-3 col-md-2 right-label">链接地址</label>
					<div class="col-xs-12 col-sm-8 col-lg-9">
						<input type="text" class="form-control" ng-model="pagedata.item.link.url" style="border-color: rgb(221, 221, 221);">
					</div>
				</div>
			</div>
			<div class="modal-footer">
				<a href="javascript:;" class="btn btn-primary" aria-hidden="true" data-dismiss="modal">确定</a>
			</div>
			</div>
		</div>
	</div>
</div>
<div id="show_addwxapp" class="modal fade" tabindex="-1" style="z-index:99999;display:none">
	<div class="modal-dialog" style="width:920px;left:0%;bottom:0;">
		<div class='modal-content' style="padding-bottom:0.6rem;border-radius:0">
			<div class="modal-header ng-scope">小程序 <button aria-hidden="true" data-dismiss="modal" class="close" type="button">×</button></div>
			<div class="modal-body form-horizontal tab-content">
			<div style="margin-top:15px">
				<div class="form-group ng-scope">
					<label class="col-xs-12 col-sm-3 col-md-2 right-label">小程序名称</label>
					<div class="col-xs-12 col-sm-8 col-lg-9">
						<input type="text" class="form-control" ng-model="pagedata.item.miniprogram.title" style="border-color: rgb(221, 221, 221);">
						<div class="help-block"></div>
					</div>
				</div>
				<div class="form-group ng-scope">
					<label class="col-xs-12 col-sm-3 col-md-2 right-label">小程序appid</label>
					<div class="col-xs-12 col-sm-8 col-lg-9">
						<input type="text" class="form-control" ng-model="pagedata.item.miniprogram.appid" style="border-color: rgb(221, 221, 221);">
						<div class="help-block"></div>
					</div>
				</div>
				<div class="form-group">
					<label class="col-xs-12 col-sm-3 col-md-2 right-label">小程序封面</label>
					<div class="col-xs-12 col-sm-8 col-lg-9">
						<div class="input-group">
							<input type="text" ng-model="pagedata.item.miniprogram.image" class="form-control">
							<span class="input-group-btn">
								<button class="btn btn-gray" type="button" ng-click="image(pagedata.item.miniprogram,'image')">选择图片</button>
							</span>
							<span class="input-group-btn">
								<button class="btn btn-black" type="button" ng-click="pagedata.item.miniprogram.image=''">清空</button>
							</span>
						</div>
						<div class="input-group" style="margin-top:.5em;">
							<img ng-src="{{tomedia(pagedata.item.miniprogram.image) || '../core/resource/images/nopic.jpg'}}" class="img-responsive img-thumbnail" width="150">
						</div>
					</div>
				</div>
				<div class="form-group ng-scope">
					<label class="col-xs-12 col-sm-3 col-md-2 right-label">小程序path</label>
					<div class="col-xs-12 col-sm-8 col-lg-9">
						<input type="text" class="form-control" ng-model="pagedata.item.miniprogram.path" style="border-color: rgb(221, 221, 221);">
						<div class="help-block">小程序首页的路径，示例：pages/index/index</div>
					</div>
				</div>
			</div>
			<div class="modal-footer">
				<a href="javascript:;" class="btn btn-primary" aria-hidden="true" data-dismiss="modal">确定</a>
			</div>
			</div>
		</div>
	</div>
</div>
<script>
if(scope.pagedata.item.content){
	scope.pagedata.item.content=decodeURIComponent(scope.pagedata.item.content);
}
scope.pagedata.setpost=function(item){
	var postdata=item;
	postdata.content=encodeURIComponent(postdata.content);
	scope.post(postdata,'post','');
}
scope.pagedata.selectEmoji=function(){
	var res=function(emoji){
		scope.pagedata.item.content+=emoji;
	}
	scope.modal_func(res,'','tools.emoji','','core');
}
scope.unitfunc.choose_many=function(tovalue,field,url){
		if(url.indexOf('/')<0){
			url='/'+url;
		}
		scope.modal_func(function(res){
			if(!Array.isArray(tovalue[field])){
				tovalue[field]=[];
				tovalue[field].push(res);
			}else{
				var has=false;
				tovalue[field].forEach(function(item){
					if(JSON.stringify(item)==JSON.stringify(res)){
						has=true;
					}
				});
				if(!has){
					tovalue[field].push(res);
				}
			}
		},'',url);
}
scope.pagedata.upnews=function(choose_type){
	scope.unitfunc.choose_many(scope.pagedata.item,'link','/wechat.choose_media//ismore=true&onetype=news&wechat_id='+scope.pagedata.item.wxgid)
}
</script>